home *** CD-ROM | disk | FTP | other *** search
/ Aminet 16 / Aminet 16 (1996)(GTI - Schatztruhe)[!][Dec 1996].iso / Aminet / misc / emu / QDOS2.lha / QLsource / ROMsrc / INC / AMIGQDOS_inc < prev    next >
Text File  |  1995-07-27  |  8KB  |  365 lines

  1. */beginfile AMIGQDOS_inc
  2.  
  3. ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4. ; AmigaQDOS_inc - Amiga QDOS includes file
  5. ;           - last modified 25/07/95
  6.  
  7. ; QDOS-Amiga sources by Rainer Kowallik
  8. ;  ...latest changes by Mark J Swift
  9.  
  10.  
  11. ;         **** ATTENTION! ****
  12. ;
  13. ; $00000-$0BFFF is reserved for the QDOS ROM
  14. ;
  15. ; $0C000-$0FFFF can be used for whatever you wish
  16. ;
  17. ; $10000-$13FFF is reserved for the first bitplane
  18. ; $14000-$17FFF is reserved for the second bitplane
  19. ;
  20. ; $18000-$180FF is reserved for QL I/O
  21. ;
  22. ; $18100-$18167 is reserved for special amiga variables
  23. ;
  24. ; $18168-$18280 is reserved for the QL BEEP sound sample
  25. ;
  26. ; $18280-$185FF is reserved for the main sprite list
  27. ;
  28. ; $18600-$187FF is reserved for main copper list
  29. ;
  30. ; $18800-$1BFFF is reserved for the floppy disk buffer
  31. ;
  32. ; $1C000-$1FFFF is reserved for Amiga specific ROMs that patch
  33. ;           the QDOS ROM to work on the Amiga
  34. ;
  35. ; $20000-$27FFF is reserved for the QL screen
  36. ;
  37. ; $28000 --->   is reserved for system variables, a possible
  38. ;           second screen, and the QL tables and work area.
  39.  
  40.  
  41. AV_IDENT    EQU    'Grub'
  42.  
  43. ; define track sizes for read and write
  44.  
  45. TLEN       EQU    12500    ; theoretical size
  46. WLEN       EQU    TLEN+20    ; 20 bytes extra
  47. RLEN       EQU    TLEN+1324 ; 1 sector extra
  48.  
  49. ; address of various bits of hardware
  50.  
  51. BPLANE1       EQU    $10000
  52. BPLANE2       EQU    $14000
  53. BPLANE3       EQU    $12000
  54.  
  55. SAMPLE       EQU    $18168
  56.  
  57. SPRNULL       EQU    $18280
  58. SPRLST       EQU    $18288
  59.  
  60. COPLST       EQU    $18600
  61.  
  62. MFMBUFFER   EQU    $18800    ; disk MFM buffer
  63.  
  64. ** AMGVARS - Variables specific to QDOS-Amiga **
  65.  
  66. AMGVARS       EQU    $18100
  67.  
  68. AV.IDENT    EQU    $18100    ; (long)
  69. AV.RSETlink EQU    $18110
  70. AV.ILLGlink EQU    $18114
  71. AV.MAINlink EQU    $18118
  72. AV.LVL5link EQU    $1811C
  73. AV.LVL7link EQU    $18120
  74. AV.TRP0link EQU    $18124
  75. AV.TRP1link EQU    $18128
  76.  
  77. AV.SR       EQU    $18138    ; (word)
  78.  
  79. AV.CIAA_ICR EQU    $1813A    ; (byte)
  80. AV.CIAB_ICR EQU    $1813B    ; (byte)
  81. AV.CIAA_MSK EQU    $1813C    ; (byte)
  82. AV.CIAB_MSK EQU    $1813D    ; (byte)
  83.  
  84. AV.FLGS1    EQU    $1813E    ; (byte)
  85.             ; bit 7 = 1 disable blitr activity
  86.             ;     0 enable blitr activity
  87.             ;     6 = 1 blitter active
  88.             ;     0 blitter inactive
  89.  
  90. AV.MAIV       EQU    $18140    ; (long) Ptr to MAIN vars
  91. AV.VDUV       EQU    $18144    ; (long) Ptr to VDU vars
  92. AV.CLKV       EQU    $18148    ; (long) Ptr to CLOCK vars
  93. AV.KEYV       EQU    $1814C    ; (long) Ptr to KEYB'RD vars
  94. AV.PARV       EQU    $18150    ; (long) Ptr to PARPORT vars
  95. AV.SERV       EQU    $18154    ; (long) Ptr to SERPORT vars
  96. AV.DSKV       EQU    $18158    ; (long) Ptr to disk vars
  97. AV.SNDV       EQU    $1815C    ; (long) Ptr to sound vars
  98.  
  99. ** Variables local to QDOS ROM patch routines **
  100.  
  101. MV.RSETlink EQU    $00
  102. MV.RSET       EQU    $04    ; (long) custom reset routine
  103.  
  104. MV.LVL7link EQU    $08
  105. MV.LVL7       EQU    $0C    ; (long) custom CTRL-ALT-7
  106.  
  107. MV.RVARS    EQU    $10    ; (long) ptr to variables below
  108.  
  109. MV_LEN       EQU    $14
  110.  
  111. ** ROM links allocated by MAIN routine **
  112.  
  113. RV.RSETlink EQU    $00
  114. RV.RSET       EQU    $04    ; (long) reset routine
  115.  
  116. RV.ILLGlink EQU    $08
  117. RV.ILLG       EQU    $0C    ; (long) illegal interrupt
  118.  
  119. RV.MAINlink EQU    $10
  120. RV.MAIN       EQU    $14    ; (long) main QL interrupt
  121.  
  122. RV.LVL5link EQU    $18
  123. RV.LVL5       EQU    $1C    ; (long) CTRL-ALT-5.
  124.  
  125. RV.LVL7link EQU    $20
  126. RV.LVL7       EQU    $24    ; (long) CTRL-ALT-7
  127.  
  128. RV.TRP0link EQU    $28
  129. RV.TRP0       EQU    $2C    ; (long)
  130.  
  131. RV.TRP1link EQU    $30
  132. RV.TRP1       EQU    $34    ; (long)
  133.  
  134. RV_LEN       EQU    $38
  135.  
  136. ** Variables local to VDU routines **
  137.  
  138. VV.XINTLink EQU    $00    ; (long)
  139.             ; (long)
  140. VV.POLLLink EQU    $08    ; (long)
  141.             ; (long)
  142.  
  143. VV.LVL7link EQU    $10    ; (long) address
  144. VV.LVL7       EQU    $14    ; (long) address
  145.  
  146. VV.PRIINc   EQU    $18    ; (byte)
  147. VV.PRIBNd   EQU    $19    ; (byte)
  148. VV.PRIACc   EQU    $1A    ; (word)
  149. VV.PRICNt   EQU    $1C    ; (word)
  150.  
  151. VV.STAT       EQU    $1E    ; (byte)
  152.  
  153. VV.4COL0    EQU    $20    ; (word)
  154. VV.4COL1    EQU    $22    ; (word)
  155. VV.4COL2    EQU    $24    ; (word)
  156. VV.4COL3    EQU    $26    ; (word)
  157.  
  158. VV.8COL0    EQU    $28    ; (word)
  159. VV.8COL1    EQU    $2A    ; (word)
  160. VV.8COL2    EQU    $2C    ; (word)
  161. VV.8COL3    EQU    $2E    ; (word)
  162.  
  163. VV_LEN       EQU    $30
  164.  
  165. ** Variables local to clock routines **
  166.  
  167. CV.XINTLink EQU    $00    ; (long)
  168.             ; (long)
  169. CV.POLLLink EQU    $08    ; (long) not used
  170.             ; (long)
  171.  
  172. CV.RSETlink EQU    $10
  173. CV.RSET       EQU    $14    ; (long) reset routine
  174.  
  175. CV.LVL7link EQU    $18    ; (long) address
  176. CV.LVL7       EQU    $1C    ; (long) address
  177.  
  178. CV.TRP1link EQU    $20    ; (long) address
  179. CV.TRP1       EQU    $24    ; (long) address
  180.  
  181. CV_LEN       EQU    $28    ; (long)
  182.  
  183. ** Define some variables local to keyboard routines **
  184.  
  185. KV.XINTLink EQU    $00    ; (long) address
  186.             ; (long) ptr
  187.  
  188. KV.POLLLink EQU    $08    ; (long) address
  189.             ; (long) ptr
  190.  
  191. KV.LVL7link EQU    $10    ; (long) address
  192. KV.LVL7       EQU    $14    ; (long) address
  193.  
  194. KV.TRP1link EQU    $18    ; (long) address
  195. KV.TRP1       EQU    $1C    ; (long) address
  196.  
  197. KV.SHIFTflg EQU    $20    ; (word)
  198. KV.ACTKEy   EQU    $22    ; (word)
  199. KV.STORAwkey EQU    $24    ; (4xlong)
  200. KV.QLASCtbl EQU $34    ; (long) ptr to ASCII table
  201.  
  202. KV.STOMOuse EQU $38    ; (word)
  203.  
  204. KV.PTROLDX  EQU    $3A    ; (word)
  205. KV.PTROLDY  EQU    $3C    ; (word)
  206.  
  207. KV.PTRX       EQU    $3E    ; (word)
  208. KV.PTRY       EQU    $40    ; (word)
  209.  
  210. KV.PTRINCX  EQU    $42    ; (word)
  211. KV.PTRINCY  EQU    $44    ; (word)
  212.  
  213. KV.PTRMINX  EQU    $46    ; (word)
  214. KV.PTRMINY  EQU    $48    ; (word)
  215. KV.PTRMAXX  EQU    $4A    ; (word)
  216. KV.PTRMAXY  EQU    $4C    ; (word)
  217.  
  218. KV.PTRERRX  EQU    $4E    ; (word)
  219. KV.PTRERRY  EQU    $50    ; (word)
  220.  
  221. KV_LEN       EQU    $52    ; length of KV vars
  222.  
  223. ** Define some variables local to parallel port routines **
  224.  
  225. ; (necessary for IO.SERIO)
  226.  
  227. PV.PEND       EQU    $28    ; (long) pending test
  228. PV.FBYTE    EQU    $2C    ; (long) fetch byte
  229. PV.SBYTE    EQU    $30    ; (long) send byte
  230. PV.RTS       EQU    $34    ; (word) RTS (4E75)
  231.  
  232. PV.LVL7link EQU    $36    ; (long)
  233. PV.LVL7       EQU    $3A    ; (long) address
  234.  
  235. PV.PARTQ    EQU    $3E    ; (long) address of output queue
  236.  
  237. PV_LEN       EQU    $42    ; length of PAR port vars
  238.  
  239. ** Define some variables local to serial port routines **
  240.  
  241. ; (necessary for IO.SERIO)
  242.  
  243. SV.PEND       EQU    $28    ; (long) pending test
  244. SV.FBYTE    EQU    $2C    ; (long) fetch byte
  245. SV.SBYTE    EQU    $30    ; (long) send byte
  246. SV.RTS       EQU    $34    ; (word) RTS (4E75)
  247.  
  248. SV.LVL7link EQU    $36    ; (long)
  249. SV.LVL7       EQU    $3A    ; (long) address
  250.  
  251. SV.TRP1link EQU    $3E    ; (long)
  252. SV.TRP1       EQU    $42    ; (long) address
  253.  
  254. SV_LEN       EQU    $46    ; length of SER port vars
  255.  
  256. ** Define some variables local to sound routines **
  257.  
  258. BV.XINTLink EQU    $00    ; (long) address
  259.             ; (long) ptr
  260.  
  261. BV.POLLLink EQU    $08    ; (long) address
  262.             ; (long) ptr
  263.  
  264. BV.LVL7link EQU    $10    ; (long)
  265. BV.LVL7       EQU    $14    ; (long) address
  266.  
  267. BV.TRP1link EQU    $18    ; (long)
  268. BV.TRP1       EQU    $1C    ; (long) address
  269.  
  270. BV.DURVAL   EQU    $20    ; (long)
  271. BV.DURCNT   EQU    $24    ; (long)
  272. BV.PITCH1   EQU    $28    ; (word)
  273. BV.PITCH2   EQU    $2A    ; (word)
  274. BV.GRDVAL   EQU    $2C    ; (long)
  275. BV.GRDCNT   EQU    $30    ; (long)
  276. BV.PITCH    EQU    $34    ; (word)
  277. BV.PITINC   EQU    $36    ; (word)
  278. BV.REPVAL   EQU    $38    ; (word)
  279. BV.REPCNT   EQU    $3A    ; (word)
  280. BV.FUZZ       EQU    $3C    ; (word)
  281. BV.RAND       EQU    $3E    ; (word)
  282. BV.SEED       EQU    $40    ; (word)
  283. BV.NOTE       EQU    $42    ; (word)
  284. BV.BEEP       EQU    $44    ; (word)
  285.  
  286. BV_LEN       EQU    $46    ; length of BV vars
  287.  
  288. ** Define some variables local to Floppy routines **
  289.  
  290. FV.POLLLink EQU    $00    ; (long) address
  291.                 ; (long)
  292. FV.POLLActiv EQU    $08    ; (byte)
  293.  
  294. FV.XINTLink EQU    $0A    ; (long) address
  295.                 ; (long)
  296.  
  297. FV.FLAGS    EQU    $12    ; (word)
  298.  
  299.        ; bit 14 1=write 0=read
  300.        ; bit 13 1=index on write 0=no index on write
  301.        ; bit 12 1=index on read  0=no index on read
  302.        ; bit 11 1=use SYNC word  0=no SYNC on read
  303.        ; bit  5 1=retry on error 0=no retry on error
  304.  
  305. FV.CNGFLag  EQU    $14    ; (byte) disk change status
  306. FV.RDYFLag  EQU    $15    ; (byte) disk ready status
  307.  
  308. FV.LASTBit  EQU    $16    ; (word) last bit in MFM
  309.  
  310. FV.REQDRive EQU    $18    ; (word) required drive
  311.  
  312. FV.MAXDRive EQU    $1A    ; (word) max drive possible
  313.  
  314. FV.DRVVArs  EQU    $1C    ; drive variables here
  315.  
  316.  
  317. ; Define drive variables (there's one of these for every drive)
  318.  
  319. DV.TYPE       EQU    $00    ; (long)
  320.  
  321. DV.TIMEOut  EQU    $04    ; (word)
  322.  
  323. DV.SIDE       EQU    $06    ; (word)
  324. DV.TRACK    EQU    $08    ; (word)
  325.  
  326. DV.SIDE0buff EQU    $0A    ; buffer vars for side 0
  327. DV.SIDE1buff EQU    $0E    ; buffer vars for side 1
  328.  
  329. DV_LEN       EQU    $12
  330.  
  331. ; end of variables
  332.  
  333. FV_LEN       EQU    FV.DRVVArs+4*DV_LEN
  334.  
  335.  
  336. ;    Define ASCII buffer variables
  337.  
  338. AB.DRIVE    EQU    $00    ; (word)
  339. AB.SIDE       EQU    $02    ; (word)
  340. AB.TRACK    EQU    $04    ; (word)
  341.  
  342. AB.PENDWflag EQU    $06    ; (word)
  343. AB.BADFLag  EQU    $08    ; (word)
  344.  
  345. AB.LASTBit  EQU    $0A    ; (word) last bit in MFM
  346.  
  347. AB.SCTRPtrs EQU    $0C
  348.  
  349. AB.SCTR1    EQU    $0C
  350. AB.SCTR2    EQU    $10
  351. AB.SCTR3    EQU    $14
  352. AB.SCTR4    EQU    $18
  353. AB.SCTR5    EQU    $1C
  354. AB.SCTR6    EQU    $20
  355. AB.SCTR7    EQU    $24
  356. AB.SCTR8    EQU    $28
  357. AB.SCTR9    EQU    $2C
  358.  
  359. AB.BUFBEg   EQU    $30
  360.  
  361. AB.BUFENd   EQU    $1242
  362.  
  363. ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  364. */endfile
  365.